//index.js
//获取应用实例
const app = getApp()
const fetch = require('../../utils/fetch.js')
Component({
  data: {
    showSearch: false
  },
  ready () {
    console.log(this.router.params)
  },
  router: {
    parent: 'index',
    name: 'order',
    index: 20
  },
  methods: {
    checkAll () {
      this.setData({
        checkAll: !this.data.checkAll
      })
    },
    search () {
      console.log('查询')
      this.setData({
        showSearch: true
      })
    },
    export () {
      console.log('导出')
    },
    showdetail(e){
      this.setData({
        showDetail: true,
        orderId: e.currentTarget.dataset.orderid
      })
    },
    back(){
      this.setData({
        showDetail: false,
        orderId: null
      })
    },
    closesearch () {
      this.setData({
        showSearch: false
      })
    },
    searchCategory (e) {
      this.setData({
        category: e.detail.value
      })
    },
    searchGoods (e) {
      this.setData({
        goods: e.detail.value
      })
    },
    searchState (e) {
      this.setData({
        state: e.detail.value
      })
    },
    searchNumber (e) {
      this.setData({
        number: e.detail.value
      })
    },
    handle () {
    }
  }
})
